package com.example.lottery.dao.mapper;

import com.example.lottery.dao.dataobject.ActivityDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ActivityMapper {
    int insert(ActivityDO row);

    int insertSelective(ActivityDO row);

    ActivityDO selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ActivityDO row);

    int updateByPrimaryKey(ActivityDO row);

    /**
     * 获取某页活动列表
     * @param param1
     * @param param2
     * @return
     */
    List<ActivityDO> selectActivityListByPage(@Param("param1") Integer param1,
                                              @Param("param2") Integer param2);

    /**
     * 获取活动总条数
     * @return
     */
    int selectAllActivityCount();

    int updateStatus(@Param("id") Long id,@Param("status")String status);

    String selectNameById(@Param("id") Long id);

    String selectStatus(@Param("id") Long id);
}